/* 
 * File:   MergeMdiChild.h
 * Author: Morpheus
 *
 * Created on 20 juin 2013, 17:21
 */

#ifndef _MERGEMDICHILD_H
#define	_MERGEMDICHILD_H

#include "ui_MergeMdiChild.h"
#include "MyBatchMerge.h"

class QCloseEvent;

class MergeMdiChild : public QWidget {
    Q_OBJECT
public:
    MergeMdiChild(QWidget* parent = 0);
    virtual ~MergeMdiChild();
    
    MyBatchMerge getBatchMerge() const;
    void setBatchMerge(const MyBatchMerge& data);
    
    int getUuid() const;
    
protected:
    void closeEvent(QCloseEvent*);
    
public Q_SLOTS:
    void setSaveFile(const QString&, const bool&);
    void updateTextOutline(const QString&, const bool&);
    void on_tableView_activated(const QModelIndex&);
    void OnTableViewCurrentRowChanged(const QModelIndex&, const QModelIndex&);
    void on_toolButtonAdd_clicked();
    void on_toolButtonDel_clicked();
    void on_toolButtonGoUp_clicked();
    void on_toolButtonGoDown_clicked();
    void on_pushButtonSave_clicked();
    void on_pushButtonCancel_clicked();
    void on_textEdit_textChanged();
    void on_tagWidgetSaveFile_formTag(const QString&);
    void on_tagWidgetBatchUnit_formTag(const QString&);
    void modified(const bool&);
    
Q_SIGNALS:
    void savedBatch(const QByteArray&);
    
private:
    Ui::MergeMdiChild widget;
    MyBatchUnit m_currUnit;
    QString m_currTitle;
};

#endif	/* _MERGEMDICHILD_H */
